Skip to content

Conversation

@juwu-odoo
Copy link

Currently logging emails with attachments can encounter several issues, including:

  • Error if there's a mismatch between the number of img tags and inline attachments
  • Images will sometimes be embedded in the wrong order
  • URL images are incorrectly overwritten

This commit refactors logRequest to be invariant to the email body and possible missing, extra, and/or out-of-order attachments. This is done by processing the .eml data directly and mapping attachments directly to img tags via contentId. Processing the .eml data is needed since the outlook-js API does not expose a method to fetch the attachment's contentId.

Currently logging emails with attachments can encounter several issues, including:
- Error if there's a mismatch between the number of img tags and inline attachments
- Images will sometimes be embedded in the wrong order
- URL images are incorrectly overwritten

This commit refactors logRequest to be invariant to the email body and possible missing, extra, and/or out-of-order attachments.
This is done by processing the .eml data directly and mapping attachments directly to img tags via contentId.
Processing the .eml data is needed since the outlook-js API does not expose a method to fetch the attachment's contentId.
@juwu-odoo
Copy link
Author

@std-odoo here is the 19.0 PR :)

@jorv-odoo
Copy link

@std-odoo @tde-banana-odoo just a friendly poke to know where we at with this (bisous)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants